

function cal(_this){
	
	//alert(_this.innerText);
	
	//1 拿到具体的值
	var xin =_this.innerText;
	
	//2把这个值放到文本框中
	
	var lao =document.getElementById('txtValue').value;
	
	var xianzai = lao+xin;
	document.getElementById('txtValue').value=xianzai;
}

function jieguo(){
	//1取得文本框的值
	
	//10+20
	var v =document.getElementById('txtValue').value
	
	//2计算
	document.getElementById('txtValue').value = eval(v);
}


function clearAll(){
	document.getElementById('txtValue').value='';
}
